#include "stdafx.h"
/************** TIMER STATES **************/
enum abil_state { casting, cooldown, travel, dot };
struct timer_state
{
    abil_state state;
	float delay; // either cooldown or cast time
	unsigned short emit, abil, target;
};
/************** ABILITIES **************/
struct abil_base
{
    float 
        cooltime;       // < 0, instant then cooldown, > 0, charge
    unsigned char
        mask,           //
        range,          // 0 = self emit
        radius,         // 0 = single target (might be mutually exclusive with self emit)
        velocity,       // 0 = instant landing on target
        ticks,          // 0 = no dot
        cost;
    unsigned short    
        dmg,            
        dmg_tick,
        dmg_per_level,
        dmg_tick_per_level;
};
// ***************** per character, after calculation pass
struct abil_char 
{
    unsigned short
        experience,
        abil,
        dmg,
        dmg_tick,
        on_cooldown;
};
/************** CHARACTERS **************/
// MOVING RUNNING FALLING STUNNED INVISIBLE STEALTH KNOCKED DEAD BLINDED SNARED 
struct character_s
{
	unsigned short
		mask,
		target_id,
		moving_speed_default,	// might be a int, since it's multiplier
		stealth_range, 			// the smaller the stealthier
		//attack_bonus, 		// % of bonus attacks, apply in the final pass
		power, 					// might, mana, energy, etc
		life,					
		defense, 				// percentage of damage reduction, negative
		dmg_tick;				// dmg taken per tick
	
	std::vector <abil_char>  Abilities;
};

/*
enum event_state   { JUMPS, LANDS, MOVES, STOPS, USE_ITEM, ABILITY };
struct event_abil  { int target_id, abil_state_id; };
struct event_phys  { Vec3 pos, vel; Quaternion orient; };
struct event_item  { int item_id; };

struct Event
{
	event_state type;
	int emitter_id;
	union
	{
		event_abil ev_abil; //event_phys ev_phys;
		event_item ev_item;
	};
	Event(int, int);
	Event(int, int, int);
};*/
//struct event_stop { float pos[6]; };
/*
 * 2 kinds of paradigms for networking:
 * atomic event
 * timed state/transition flow
 */
/*
struct character_states // remember most values don't go over 100
{
	std::vector<float>
		moving_speed_default,
		stealth_range, 		
		defense, 				
		attack_bonus, 		
		power, 				
		life,
		time_buffer;
	
	std::vector<int> mask, casting_ability_id;
	std::vector<string> name;
	std::vector<std::vector<int> > AbilityIDs;
/*	character_s(const character_s &);
	character_s(
				float _moving_speed_default = 15.f	,
				float _stealth_range	    = 20.f	,
				float _defense 			    = 1.f	,
				float _attack_bonus 	    = 0.f	,
				float _power			    = 100.f	,
				float _life				    = 20.f	,
				int _mask				    = 0		,
				string _name			    = "dou"	
				);
};
*/
